<h1 {% if collection.products.size > 0 and collection.subcollections.size == 0 %}style="margin-top: 30px;"{% endif  %}>{{collection.title}}</h1>
{% if collection.description %}
<div class="editor-content clear style-block" style="background: {{settings.bg_color6}}; padding-bottom: 3px;">
  {{ collection.description }}
</div>
{% endif %}
{% if collection.subcollections.size > 0 %}
<div class="style-block" style="background: {{settings.bg_color6}}; padding: 18px 36px">
  {% for collection in collection.subcollections %}
  <div class="sub-block {% cycle '','','','','side' %}">
    <a href="{{collection.url}}" class="img" style="background: url({{collection.image.compact_url}}) center center no-repeat;">	
    </a>
    <a href="{{collection.url}}" class="title">{{collection.title}}</a>
  </div>
  {% endfor %}
</div>
{% else %}

{% if collection.products.size > 0 %}
{% paginate products by 20 %}
{% if paginate.parts.size > 1 %}
<div class="sorting-wrap">
  <div class="sorting fl">&nbsp;
  </div> 
  {% include 'pagination' %}
</div>
  {% endif %}
<div class="style-block" style="background: {{settings.bg_color6}};">
  {% for product in collection.products %}
  {% include 'product_block' %}
  {% endfor %}
</div>
{% if paginate.parts.size > 1 %}
{% include 'pagination' %}
{% endif %}		 
{% endpaginate %}

{% else %}
{% assign filtered = false %}
{% for property in collection.properties %}  
{% for characteristic in property.characteristics %}
{% if characteristic.current? %}{% assign filtered = true %}{% endif %}
{% endfor %}  
{% endfor %}
{% if filtered %}
<p>По заданным параметрам товаров не найдено</p>
{% else %}
<p>В данной категории товары отсутствуют</p>
{% endif %}
{% endif %}

{% endif %}
{% if collection.seo_description %}
<div class="editor-content seo-content clear style-block" style="background: {{settings.bg_color6}}; padding-bottom: 3px;">{{ collection.seo_description }}</div>
{% endif %}